home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
Dev
/
Oberon
/
source
/
amiga
/
KeyMapLib.mod
< prev
next >
Wrap
Text File
|
1995-06-29
|
2KB
|
80 lines
(**************************************************************************
$RCSfile: KeyMapLib.mod $
Description: Keymap library definitions
Created by: fjc (Frank Copeland)
$Revision: 3.8 $
$Author: fjc $
$Date: 1995/06/04 23:13:14 $
$VER: keymap_protos.h 36.4 (19.7.90)
Includes Release 40.15
(C) Copyright 1985-1993 Commodore-Amiga, Inc.
All Rights Reserved
Oberon-A interface Copyright © 1994-1995, Frank Copeland.
This file is part of the Oberon-A Interface.
See Oberon-A.doc for conditions of use and distribution.
***************************************************************************)
<* STANDARD- *>
MODULE [2] KeyMapLib;
IMPORT SYS := SYSTEM, Kernel, e := Exec, ie := InputEvent, km := KeyMap;
(*-- KeyMap Base variable --------------------------------------------*)
CONST
keyMapName * = "keymap.library";
VAR
base * : e.LibraryPtr;
(*-- Library Functions ------------------------------------------------*)
(*--- functions in V36 or higher (Release 2.0) ---*)
PROCEDURE SetKeyMapDefault* [base,-30]
( keyMap [8] : km.KeyMapPtr );
PROCEDURE AskKeyMapDefault* [base,-36] ()
: km.KeyMapPtr;
PROCEDURE MapRawKey* [base,-42]
( event [8] : ie.InputEventDummyPtr;
VAR buffer [9] : ARRAY OF CHAR;
length [1] : LONGINT;
keyMap [10] : km.KeyMapPtr )
: INTEGER;
PROCEDURE MapANSI* [base,-48]
( string [8] : ARRAY OF CHAR;
count [0] : LONGINT;
VAR buffer [9] : ARRAY OF CHAR;
length [1] : LONGINT;
keyMap [10] : km.KeyMapPtr )
: LONGINT;
(*-- Library Base variable --------------------------------------------*)
<*$LongVars-*>
(*-----------------------------------*)
PROCEDURE* [0] CloseLib (VAR rc : LONGINT);
BEGIN (* CloseLib *)
IF base # NIL THEN e.CloseLibrary (base) END
END CloseLib;
BEGIN
base := e.OpenLibrary (keyMapName, e.libraryMinimum);
IF base # NIL THEN Kernel.SetCleanup (CloseLib) END
END KeyMapLib.